/*
** xmalloc.c for  in /home/costa_k/rendulocal/cunix/philosophes/epi-philosophe/srcs
** 
** Made by Kevin Costa
** Login   <costa_k@epitech.net>
** 
** Started on  Wed Apr 20 09:16:25 2011 Kevin Costa
** Last update Wed Apr 20 09:43:32 2011 Kevin Costa
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>

void		*xmalloc(size_t size)
{
  void		*res;

  if ((res = malloc(size)) == NULL)
    {
      fprintf(stderr, "Malloc error: %s\n", strerror(errno));
      exit(EXIT_FAILURE);
    }
  return (res);
}
